﻿#region Legal notice
/*
 * This file is part of EPPLib.
 * Copyright 2010, 2011 
 * Gianluca Esposito (info@gianlucaesposito.it)
 * ----------------------------------------------------------------------------
 * EPPLib is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
 * (at your option) any later version.
 * 
 * EPPLib is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with Nome-Programma; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EPPLib.Data;

namespace EPPLib.Managers
{
    public interface IDataManager
    {
        ContactDataCollection ReadContacts(Guid ownerID);
        ContactDataObject ReadContact(string id, Guid ownerID);
        void DeleteContact(string id, Guid ownerID);
        ContactDataObject SaveContact(ContactDataObject obj);

        DomainDataCollection ReadDomains(Guid ownerID);
        DomainDataObject ReadDomain(string name, Guid ownerID);
        void DeleteDomain(string name, Guid ownerID);
        DomainDataObject SaveDomain(DomainDataObject obj);

        CountryDataCollection ReadCountries();
        CountryDataObject ReadCountry(string code);

        TransactionLogDataObject ReadTransactionLog(int id, Guid ownerID);
        int SaveTransactionLog(TransactionLogDataObject obj);
        TransactionLogDataCollection ReadTransactionLogs(Guid ownerID);
        void ClearTransactionLogs(Guid ownerID);

        ConfigurationDataObject ReadConfiguration(Guid userID);
        void SaveConfigurationNewPassword(Guid userID, string newPassword);
        
        EntityTypeDataCollection ReadEntityTypes();

        HostDataCollection ReadHosts(string domainName);
        int SaveHost(HostDataObject obj);
        void ClearHosts(string domainName);
        
        int IncreaseOperationCount(Guid userID);
    }
}
